//package com.bfsoft.springbootinit.util;
//
//import lombok.extern.slf4j.Slf4j;
//import org.flowable.engine.RepositoryService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.core.io.ClassPathResource;
//import org.springframework.core.io.Resource;
//
//@Component
//@Slf4j
//public class ProcessDeployment {
//
//	@Autowired
//	private RepositoryService repositoryService;
//
//	/**
//	 * 部署流程定义
//	 */
//	public void deployProcess() {
//		try {
//			// 加载 BPMN 文件
//			Resource resource = new ClassPathResource("purchase-process.bpmn");
//
//			// 部署流程定义
//			repositoryService.createDeployment()
//					.addInputStream("purchase-process.bpmn", resource.getInputStream())
//					.deploy();
//
//			System.out.println("流程定义已成功部署");
//
//		} catch (Exception e) {
//			log.info ( "流程部署失败" , e );
//		}
//	}
//}
